package 关键字.Super;

public class 父类 {
    private String name;
    private int age;
    private String sex;

    //构造函数
    public 父类() {
        System.out.println("父类构造函数");
    }

    //全参数构造函数
    public 父类(String name, int age, String sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
        System.out.println("父类全参数构造函数");
    }

    public int add(int a, int b) {
        return a + b;
    }
}
